Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(NcDialogButton): Allow to return false from callback to keep dialog open #6005

Merged
merged 2 commits into from
Aug 31, 2024

Conversation

susnux
Copy link
Contributor

@susnux susnux commented Aug 21, 2024

☑️ Resolves

If the callback returns false then the click event will not be forwarded. This could be useful if the click triggers a validation that fails and the user should be able to fix the issue.

🏁 Checklist

  • ⛑️ Tests are included or are not applicable
  • 📘 Component documentation has been extended, updated or is not applicable
  • 3️⃣ Backport to next requested with a Vue 3 upgrade

@susnux susnux added enhancement New feature or request 3. to review Waiting for reviews feature: dialog Related to the dialog component labels Aug 21, 2024
Copy link
Contributor

@st3iny st3iny left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code looks good otherwise.

src/components/NcDialogButton/NcDialogButton.vue Outdated Show resolved Hide resolved
@susnux susnux force-pushed the feat/allow-keep-dialog-open branch 2 times, most recently from 642f137 to 1001142 Compare August 29, 2024 20:58
@susnux
Copy link
Contributor Author

susnux commented Aug 29, 2024

Added an example with loading buttons.

@susnux susnux force-pushed the feat/allow-keep-dialog-open branch from 1001142 to 3fbf2d8 Compare August 29, 2024 22:35
Copy link
Contributor

@ShGKme ShGKme left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

With loading it's really awesome now

src/components/NcDialogButton/NcDialogButton.vue Outdated Show resolved Hide resolved
@ShGKme ShGKme added this to the 8.18.0 milestone Aug 30, 2024
@susnux susnux force-pushed the feat/allow-keep-dialog-open branch 3 times, most recently from ef493ec to f907fef Compare August 30, 2024 19:49
susnux and others added 2 commits August 31, 2024 20:18
…ialog open

If the callback returns `false` then the click event will not be forwarded.
This could be usful if the click triggers a validation that fails and the user
should be able to fix the issue.

Co-authored-by: Ferdinand Thiessen <opensource@fthiessen.de>
Co-authored-by: Grigorii K. Shartsev <me@shgk.me>
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
@susnux susnux force-pushed the feat/allow-keep-dialog-open branch from f907fef to 4200009 Compare August 31, 2024 18:19
@susnux susnux merged commit 862d552 into master Aug 31, 2024
19 checks passed
@susnux susnux deleted the feat/allow-keep-dialog-open branch August 31, 2024 19:37
@susnux
Copy link
Contributor Author

susnux commented Aug 31, 2024

/backport to next

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3. to review Waiting for reviews enhancement New feature or request feature: dialog Related to the dialog component
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants